package bdhub.littletail.app.message.handler;

import bdhub.littletail.app.message.AppMessage;
import bdhub.littletail.app.message.handler.common.IMessageHandler;

/**
 * Created by BDHub-7 on 2016/2/24.
 * chenshichao@outlook.com
 */
public abstract class AbstractMessageHandler implements IMessageHandler {

    @Override
    public void execute(AppMessage message) {
        execute(message, false);
    }

    @Override
    public void execute(AppMessage message, boolean isOffline) {
        action(message);
    }

    /**
     * 消息业务处理，消息处理Service需要覆盖此方法
     * @param message
     */
    protected abstract void action(final AppMessage message);
}
